// table项
let propList = [
  { prop: "title", label: "资讯标题" },
  { label: "资讯板块", slotName: "marketPlate" },
  { label: "操作", slotName: "operation" },
];
let marketOptionsList = []
// 表单配置
let formConfig = [
  {
    label: '资讯标题',
    prop: 'title',
    type: 'input',
    width: '150px'
  },
  {
    label: '资讯板块',
    prop: 'marketPlateId',
    type: 'select',
    width: '150px',
    options: []
  }
]
// -----------------
import MarketPlate from '@/api/module/market-plate'
function queryMarketPlateList () {
  let MarketOptions = []
  MarketPlate.queryByCondition({}).then(res => {
    console.log(res.data)
    res.data.forEach(item => {
      MarketOptions.push({
        label: item.marketPlateName,
        value: item.marketPlateId
      })
    })
    formConfig.forEach(item => {
      if (item.label == "资讯板块") {
        item.options = MarketOptions
      }
    })
    marketOptionsList = MarketOptions
  })
}
queryMarketPlateList();
export { propList, formConfig, marketOptionsList }